-
Notifications
You must be signed in to change notification settings - Fork 0
✨ feat: added pydantic model for manifest validation #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Conversation
45143e6
to
c186df2
Compare
f5794b6
to
0f1d84e
Compare
…work, Organization, Package, Project, Secret, StaticRoute, and User
…e response validation - Updated network tests to utilize Network and NetworkList models, enhancing response validation. - Refactored organization tests to use Organization model for better structure and clarity. - Modified package tests to implement Package and PackageList models, ensuring accurate response checks. - Revised project tests to leverage Project and ProjectList models for improved data handling. - Enhanced secret tests to utilize Secret and SecretList models, streamlining response validation. - Updated static route tests to incorporate StaticRoute and StaticRouteList models for better consistency. - Refactored user tests to use appropriate Pydantic models, improving clarity and response validation.
0f1d84e
to
889383f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces comprehensive Pydantic model validation for SDK resources to replace the old JSONSchema validation, improving error messaging and maintainability.
Key Changes
- Replaced Munch objects with strongly typed Pydantic models for all API responses
- Migrated from JSONSchema to Pydantic validation for manifest/resource validation
- Updated test suite to use proper mock data fixtures and structured assertion patterns
Reviewed Changes
Copilot reviewed 49 out of 50 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
rapyuta_io_sdk_v2/client.py |
Added Pydantic model validation for all API methods and updated return types |
rapyuta_io_sdk_v2/utils.py |
Removed handle_and_munchify_response decorator and munch dependencies |
rapyuta_io_sdk_v2/pydantic_models/ |
New comprehensive Pydantic models for all resource types |
tests/sync_tests/ |
Updated test files to use Pydantic model fixtures and structured assertions |
tests/async_tests/ |
Updated async test files with similar validation and fixture improvements |
tests/data/mock_data.py |
Significantly expanded mock data with proper Pydantic model fixtures |
Comments suppressed due to low confidence (1)
tests/sync_tests/test_managedservice.py:1
- Duplicate function definitions detected. The
test_create_instance_binding_success
function appears twice with identical logic (lines 167-188 and 217-225), which suggests a copy-paste error during refactoring.
import httpx
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…ethods for validation
…mproved readability and maintainability
…methods to use model instances directly
1f9e28d
to
9af30e9
Compare
…cClient and Client
✨ What’s new in this PR
💡 Why this matters
resolves https://github.com/rapyuta-robotics/rapyuta_io/issues/922